<%-- 
    Document   : courseOverview
    Created on : 30-okt-2012, 12:15:35
    Author     : Kevin
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Course overview</title>
        <style type="text/css">
            table.thinTable
            {
                border-width: 0 0 1px 1px;
                border-spacing: 0;
                border-collapse: collapse;
                border-style: solid;
            }

            .thinTable td, .thinTable th
            {
                margin: 0;
                padding: 4px;
                border-width: 1px 1px 0 0;
                border-style: solid;
            }
        </style>
    </head>
    <body>
        <h2>Courses ${aantalCourses}</h2>
        <c:choose>
            <c:when test="${aantalCourses != 0}">
                <table class="thinTable">
                    <tr>
                        <td>
                            <strong>Name</strong>
                        </td>
                        <td> 
                            <strong>Description</strong>
                        </td>
                        <td> 
                            <strong>Options</strong>
                        </td>
                    </tr>
                    <c:forEach var="course" items="${coursesUitSessie}">
                        <tr>
                            <td>
                                ${course.name}
                            </td>
                            <td>
                                ${course.description}
                            </td>
                            <td>
                                <button href="#">Subscribe</button>
                                <button href="#">Chapters</button>
                            </td>
                        </tr>
                    </c:forEach>                
                </table>
            </c:when>
            <c:otherwise>
                Er zijn geen courses gevonden.
            </c:otherwise>
        </c:choose>
    </body>
</html>
